package com.lzw.test.circularref.constructdemo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: chenzhongyong
 * Date: 2021/8/5
 * Time: 15:44
 */
public class ConstructConfig {
    public static void main(String[] args) {
        new AnnotationConfigApplicationContext(A.class,B.class);
    }
}

@Component
class A {
    public A(B b) {
    }
}
@Component
class B {
    public B(A a) {
    }
}
